<form name="appForm" method="post" action="">

                        <?php echo $this->render('toolbar.php')?>
                        <div class="clr"></div>
                        <?php echo $this->render('sublink.php')?>

                        <!-- BEGIN: CONTENT -->
                        <div id="element-box">
                            <div class="t">
                                <div class="t">
                                    <div class="t"></div>
                                </div>
                            </div>
                            <div class="m">
                                <!-- BEGIN: ELEMENT BOX -->
								<div id="filters">
									<div style="float: left">
										<?php echo $strSearch;?>
									</div>
									<div style="float: right">
										<?php echo $tblGroupCategory;?>
									</div>
								</div>	

                                <!-- Area 4: In du lieu lay tu database -->
                                <table class="adminlist">
                                    <thead>
                                        <tr>
                                            <th width="43" >
                                            	<input type="checkbox" name="checkbox" id="checkbox" onclick="checkedAll()">
                                           	</th>
                                            <th><?php echo $this->translate('Name')?></th>
                                            <th width="80"><?php echo $this->translate('Status')?></th>
                                            <th width="120"><?php echo $this->translate('Resize') . ' px'?></th>
                                            <th width="120"><?php echo $this->translate('Price') . ' (VND)'?></th>
                                            <th width="120"><?php echo $this->translate('Sale Off') . ' (VND)'?></th>
                                            <th width="50"><?php echo $this->translate('Order')?></th>
                                            <th width="60"><?php echo $this->translate('Control')?></th>
                                            <th width="30">ID</th>
                                        </tr>
                                    </thead>
									<?php
										foreach($this->Items as $key => $val){
											$id 		= $val['id'];
											$name 		= $val['name'];
											$resize 	= $this->formText('resize[' . $val['id'] . ']' ,$val['resize'],array('style'=>'width: 100px; text-align: center;'));
											$price 		= $this->formText('price[' . $val['id'] . ']' ,$val['price'],array('style'=>'width: 100px; text-align: center;'));
											$selloff 	= $this->formText('selloff[' . $val['id'] . ']' ,$val['selloff'],array('style'=>'width: 100px; text-align: center;'));
											$status = $val['status'];
											if ($status == 1) {
												$linkStatus = $this->baseUrl ( $this->currentController . '/status/type/0/id/' . $id );
												$status = $this->cmsAjaxButton('ajax-active-item', 'Active', 'Inactive *'. $name . '*', $linkStatus, $id);
											} else {
												$linkStatus = $this->baseUrl ( $this->currentController . '/status/type/1/id/' . $id );
												$status = $this->cmsAjaxButton('ajax-inactive-item', 'Inactive', 'Active *'. $name . '*', $linkStatus, $id);
											}
																				
											$order 			= $this->formText('order[' . $val['id'] . ']' ,$val['order'],array('style'=>'width: 30px; text-align: center;'));
											
											
											$linkEdit		= $this->baseUrl($this->currentController . '/edit/id/' . $id);
											$btnEdit		= $this->cmsIconButton('Edit Item',$this->imgUrl . '/icon_edit.png',$linkEdit);
											
											$linkDelete		= $this->baseUrl($this->currentController . '/delete/id/' . $id);
											$btnDelete =  $this->cmsAjaxButton('ajax-delete-item', 'Delete Item', 'Delete *'. $name . '*', $linkDelete, $id);
										
											$strIconButton	= $btnEdit . ' ' . $btnDelete;
											
											$cid			= $this->formCheckbox('cid[]',$val['id']);
									?>
                                    <tr class="even">						
                                        <td align="center"><?php echo $cid;?></td>
                                        <td style="padding-left: 10px" align="left"><?php echo $name;?></td>
                                        <td align="center"><?php echo $status;?></td>
                                        <td align="center"><?php echo $resize;?></td>
                                        <td align="center"><?php echo $price;?></td>
                                        <td align="center"><?php echo $selloff;?></td>
                                        <td align="center"><?php echo $order;?></td>
                                        <td align="center"><?php echo $strIconButton;?></td>
                                        <td align="center"><?php echo $id;?></td>
                                    </tr>
                                    <?php 
										}
                                    ?>
                                    <!-- BEGIN: PAGINATION (FOOT) -->
                                    <tfoot>
                                        <tr>
                                            <td colspan="19">
                                                <div class="container">
                                                    <div class="pagination">
                                                        <?php 
                                                        	//$currentUrl = $this->baseUrl($this->currentController . '/index');
                                                        	//echo $this->paginationControl($this->panigator,'Sliding','pagination.phtml',array('currentUrl'=>$currentUrl));
                                                        ?>
                                                        <div class="limit"></div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>					
                                    </tfoot>				<!-- END: PAGINATION (FOOT) -->
                                </table>
                                <!-- Area 4: In du lieu lay tu database - End -->

                                <!-- END: ELEMENT BOX -->	
                              <div class="clr"></div>
                            </div>
                            <div class="b">
                                <div class="b">
                                    <div class="b"></div>
                                </div>
                            </div>
                        </div>
                        <!-- END: 	CONTENT -->
                    </form>